import {queryDepositState} from "@src/api/deposit";

Component({
  options: {
    addGlobalClass: true
  },
  properties: {
    orderCode: String
  },
  data: {
    visible: false,
    stateRecords: []
  },
  methods: {
    handleStop() {
      return true;
    },
    handleClose() {
      this.setData({visible: false})
    },
    fetchData() {
      queryDepositState({orderCode: this.data.orderCode}).then(res => {
        if (res.code === 0) {
          this.setData({stateRecords: res.data})
        }
      })
    },
    open() {
      this.fetchData();
      this.setData({visible: true})
    }
  }
});
